package logic.characters;

import logic.enemies.Enemy;
import logic.pruebas.GamePanel;
import logic.threads.ShootBullet;

public class Crash extends Player{
	private static final long serialVersionUID = -5520660890648874297L;

	public Crash(int x, int y, GamePanel panel, String nomImg, int salud, int attack, int defense, int magic, int resistance, int speed, int jump, int stamina, int[] abilitiesIDs ) {
		super(x, y, panel, nomImg, salud, attack, defense, magic, resistance, speed, jump, stamina, abilitiesIDs);
		specialCost = 5;
		shootCost = 2;
		staminaRecovery = 2;
		lifeRecovery = 1;
		widthDifference = 17;
		heightDifference = 7;
		collisionWidth = 30;
		collisionHeight = altura - heightDifference;
		attackTime = 800;
		shootTime = 500;
		specialTime = 800;
	}

	@Override
	public void shoot() {
		Runnable shootBullet = new ShootBullet(collisionX, collisionY, panelJuego, lookingRight, enemies, blocks, magic, true, this, shootTime);
		Thread fThread = new Thread(shootBullet);
		fThread.start();
		
	}

	@Override
	public void specialEffect(Enemy enemy) {
		enemy.damage((int)(attack * 1.5));
		enemy.velX = -enemy.velX;
	}

}
